package com.aifast.common.dataScope;

import java.lang.annotation.*;

/**
 * @Author fujian
 * @since 2022/5/18 9:03
 *
 * 数据权限
 */
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface DataScope {

    /**
     * 数据权限查询方式
     * <br> 暂时先这样 想法不成熟
     *
     * @return
     */
    QueryModeEnum queryMode() default QueryModeEnum.IN;

    String userAlias() default "";
    String userFiled() default "user_id";

    String orgAlias() default "";
    String orgFiled() default "org_id";


    /**
     * 拓展字段 先留着
     * @return
     */
    DataColumn[] value() default {@DataColumn(name = "org_id"),@DataColumn(name = "user_id")};

}
